As one of aggregation operations executed on a large number of data items having plural types of attributes, there is an aggregation operation that finds top k types of attributes appearing in an aggregation of data items designated as a processing target (hereinafter referred to as target data items) in descending order of a point value (weight, score) given to each attribute according to a particular rule. This aggregation operation is also called as Top-k, for example. Suppose that the target data item is a document (text), and that the attributes are words included in the document. Also, suppose that the point value given to each word, which is an attribute, is the number of appearance of the word in all documents. In this case, finding the top k words appearing most frequently only in a plurality of documents that meet a particular condition is one example of the Top-k aggregating operation.
As a conventional technology of this kind, there is a technology that searches through text using a first index (DOC_TO_KEY index) that specifies a list of keywords included in text from identification information of the text and a second index (KEY_TO_DOC index) that specifies a list of texts that include a keyword from identification information of the keyword (see Patent Literature 1). Here, the text is one example of the above described “target data item”, and the keyword is one example of the above described “attribute”. In this conventional technology, once receiving an input of a search condition, a search time with the first index and a search time with the second index are estimated. Then, one of the indices that facilitates a faster search is then used for a search operation.